<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数据类型</title>
</head>
<body>
    
</body>
<script>
    var intNum = 100;
    var doubleNum = 3.1415926;
    var notNum = NaN;/*NaN表示含义为 not a number*
    /*打印变量的类型，typeof可以获取变量的类型*/
    console.log(typeof intNum, typeof doubleNum, typeof notNum);

    var emptyStr = "";//空字符串；
    var str = "hello world!"
    console.log(typeof str);

    var boolean1 = true;
    console.log(typeof boolean1);

    //一个变量仅仅声明了，但是没有进行赋值，那这个变量的类型就会使undefined
    var userName;
    console.log(typeof userName);

    //null表示空对象，标示值为空
    var obj = null;
    console.log(typeof null);


</script>
</html>